package com.gugee.ins.common.dal.util;

import com.gugee.ins.common.dal.util.config.UtilConfig;
import com.gugee.ins.common.dto.InsMediaScoreDto;
import com.gugee.ins.common.model.InsMediaScore;
import com.gugee.ins.common.model.mysql.blogger.InsBloggerMain;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 帖子分数算法类
 * @author Huangxin
 */
@Slf4j
@Component
public class InsMediaScoreClient {

    /**
     *
     */
    @Autowired
    UtilConfig utilConfig;

    /**
     *
     * @return
     */
    public InsMediaScore getInsMediaScore(InsBloggerMain bloggerMain, List<InsMediaScoreDto> medias){
        return new InsMediaScore(bloggerMain,medias,utilConfig.getAvgLikeAllNet(),utilConfig.getAvgCommentAllNet(),utilConfig.getAvgShareAllNet());
    }
}
